package com.jt808.decode.model;

import io.netty.buffer.ByteBuf;
import lombok.Data;

/**
 * Jt808 Basic Message Class
 * @date 20230302
 */
@Data
public class Jt808Message {
    /**
     * Message ID
     */
    private int msgId;

    /**
     * Device ID
     */
    private String deviceId;

    /**
     * device id array
     */
    private byte[] deviceIdArr;

    /**
     * protocol version number
     */
    private int protocolVersion;

    /**
     * Message serial number
     */
    private int msgFlowId;

    /**
     * Whether the data is packet
     */
    private boolean multiPacket;

    /**
     * version flag
     */
    private int versionFlag;

    /**
     * Encryption method, 0: no encryption, 1: RSA encryption
     */
    private int encryptType;

    /**
     * Total message packages
     */
    private int packetTotalCount;

    /**
     * Package No
     */
    private int packetOrder;
    /**
     * Message body
     */
    private ByteBuf msgBody;
}
